package com.iglooit.components.gui
{
	import mx.containers.VBox;
	
	public class XMLVBox extends VBox implements IXMLContainer
	{
		public function XMLVBox()
		{
			super();
		}
		
		public function get xmllist():XML
		{
			var xmllist:XML=<vbox />;
			for each (var obj:Object in this.getChildren())
			{
				if (obj is IXMLComponent && obj != null)
				{
					(obj as IXMLComponent).submit();
					var tt:XML = (obj as IXMLComponent).xml;
					xmllist.appendChild(tt);
				}
				else if(obj is IXMLContainer && obj != null)
				{
					for each(var childrenxml:XML in (obj as IXMLContainer).xmllist.children())
					{
						xmllist.appendChild(childrenxml);
					}
				}
			}
			return xmllist;
		}
	}
}